# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=kopete
pkgver=23.08.4
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://userbase.kde.org/Kopete"
pkgdesc="An instant messenger supporting AIM, ICQ, Jabber, Gadu-Gadu, Novell GroupWise Messenger, and more"
license="GPL-2.0-or-later AND LGPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	gpgme-dev
	libidn-dev
	kcmutils5-dev
	kconfig5-dev
	kcontacts5-dev
	kcoreaddons5-dev
	kcrash5-dev
	kdbusaddons5-dev
	kdelibs4support-dev
	kdnssd5-dev
	kdoctools5-dev
	kemoticons5-dev
	khtml-dev
	ki18n5-dev
	kidentitymanagement-dev
	kitemmodels5-dev
	knotifyconfig5-dev
	kparts5-dev
	ktexteditor5-dev
	kwallet5-dev
	libkleo-dev
	qt5-qtbase-dev
	samurai
	"
checkdepends="xvfb-run"
_repo_url="https://invent.kde.org/network/kopete.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kopete-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	xvfb-run ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
364139979e277f1102db0c538732ec7db2bc5a237a8475e689708fc1eaf341b97739d9124b380919e07e6aa3e0bda7b737d48abaca7b07093a3b60554a57eec1  kopete-23.08.4.tar.xz
"
